import request from '@/utils/request'

/**
 * 家谱成员导出
 * @param {Object} data 
 */
export function familytreeExport(data) {
  return request({
    url: '/badu/familytree/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


/**
 * 家谱成员列表
 * @param {Object} data 
 */ 
export function queryFamilytreePage(query) {
  return request({
    url: '/badu/familytree/list',
    method: 'get',
    params: query
  })
}

/**
 * 家谱成员详情
 * @param {String} id 
 */
export function queryFamilytreeDetail(id) {
  return request({
    url: '/badu/familytree/'+id,
    method: 'get'
  })
}

/**
 * 新增家谱成员
 * @param {Object} data 
 */
export function addFamilytree(data) {
  return request({
    url: '/badu/familytree',
    method: 'post',
    data: data
  })
}


/**
 * 编辑家谱成员
 * @param {Object} data 
 */
export function editFamilytree(data) {
  return request({
    url: '/badu/familytree',
    method: 'put',
    data: data
  })
}


/**
 * 删除家谱成员
 * @param {String} ids 
 */
export function deleteFamilytree(ids) {
  return request({
    url: '/badu/familytree/'+ids,
    method: 'delete',
    data: data
  })
}

